/***************************************************************************
 *            fosfor_button.h
 *
 *  Thu Oct 15 16:06:12 2009
 *  Copyright  2009  Kevin DeKorte
 *  <kdekorte@gmail.com>
 ****************************************************************************/

/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
 */

#include <glib-object.h>
#include <gtk/gtk.h>
#include <clutter/clutter.h>
#include "declarations.h"

#ifndef __FOSFOR_BUTTON_H__
#define __FOSFOR_BUTTON_H__

G_BEGIN_DECLS
#define FOSFOR_TYPE_BUTTON		(fosfor_button_get_type ())
#define FOSFOR_BUTTON(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), FOSFOR_TYPE_BUTTON, FosforButton))
#define FOSFOR_BUTTON_CLASS(obj)	(G_TYPE_CHECK_CLASS_CAST ((obj), FOSFOR_BUTTON, FosforButtonClass))
#define FOSFOR_IS_BUTTON(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOSFOR_TYPE_BUTTON))
#define FOSFOR_IS_BUTTON_CLASS(obj)	(G_TYPE_CHECK_CLASS_TYPE ((obj), FOSFOR_TYPE_BUTTON))
#define FOSFOR_BUTTON_GET_CLASS	(G_TYPE_INSTANCE_GET_CLASS ((obj), FOSFOR_TYPE_BUTTON, FosforButtonClass))
typedef struct _FosforButton FosforButton;
typedef struct _FosforButtonClass FosforButtonClass;

struct _FosforButton {
    ClutterGroup parent;

	ClutterActor *foreground;
	ClutterActor *background;
	gchar *icon_name;
	gchar *stock_id;
	gint size;
	gboolean sensitive;
	gboolean backlight;
	guint width, height;
	gboolean mouse_down;
	
};

struct _FosforButtonClass {
    ClutterGroupClass parent_class;
	void (* clicked)  (FosforButton *button);
};

GType fosfor_button_get_type(void);
ClutterActor *fosfor_button_new();
ClutterActor *fosfor_button_new_from_icon_name(const gchar *icon_name, GtkIconSize size);
ClutterActor *fosfor_button_new_from_stock(const gchar *stock_id, GtkIconSize size);
void fosfor_button_set_from_icon_name(FosforButton *button, const gchar *icon_name, GtkIconSize size);
void fosfor_button_set_from_stock(FosforButton *button, const gchar *stock_id, GtkIconSize size);
void fosfor_button_set_sensitive(FosforButton *button, gboolean sensitive);
gboolean fosfor_button_get_sensitive(FosforButton *button);
void fosfor_button_set_backlight(FosforButton *button, gboolean backlight);
gboolean fosfor_button_get_backlight(FosforButton *button);


G_END_DECLS
#endif
